// Copyright 2010 Abhishek Kulkarni. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"goprop.googlecode.com/hg/goprop"
	"fmt"
)

func main() {

	temp := goprop.NewPropagatorNetwork("temp")

	f_32 := temp.NewCell("f_32")
	thirty_two := temp.NewCell("thirty_two")
	c_9 := temp.NewCell("c_9")
	five := temp.NewCell("five")
	nine := temp.NewCell("nine")
	f := temp.NewCell("f")
	c := temp.NewCell("c")

	temp.Constant(32.0, thirty_two)
	temp.Constant(5.0, five)
	temp.Constant(9.0, nine)

	temp.Sum(thirty_two, f_32, f)
	temp.Product(f_32, five, c_9)
	temp.Product(c, nine, c_9)

	c.Content(25.0)

	fmt.Printf("☯ Celsius %v °C = %v °F ☯\n", c.Content(), f.Content())
	temp.Stop()
}
